package api;

import api.betfairAPI.BetfairMarket;
import org.apache.log4j.Logger;

/**
 * User: Darren
 * Date: 25/04/13
 * Time: 4:09 PM
 */
public class MarketFactory {
    private static Logger logger = Logger.getLogger(MarketFactory.class);

    public Market getMarket(MarketType marketType) {
        switch (marketType) {
            case BETFAIR_MARKET:
                return new BetfairMarket();
            default:
                logger.fatal("Request to instantiate unknown market type: " + marketType);
                throw new RuntimeException();
        }
    }
}
